home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / ibmsyn.zip / SEMFISNT.H < prev    next >
Text File  |  1992-06-12  |  2KB  |  34 lines

  1.                                                   
  2. /* semfddnt.h */
  3.  
  4. /* NT IBM SDLC Adapter Device Driver: Nt-Specific Grabbage */
  5.  
  6.  
  7. /*****************************************************************************/
  8. /* Doing I/O on NT                                                           */
  9. /*****************************************************************************/
  10.  
  11. #define IO_DELAY(ms)             KeStallExecutionProcessor(ms)
  12.  
  13. typedef PUCHAR      IO_ADDRESS;         /* used to address a port on the I/O */
  14.                                         /* and also use for adapter base adr */
  15.  
  16. #define IO_IN(AdAdr)             CAST(READ_PORT_UCHAR(CAST(AdAdr,IO_ADDRESS)),\
  17.                                       UCHAR)
  18. #define IO_OUT(AdAdr,Value)      WRITE_PORT_UCHAR(CAST( AdAdr, IO_ADDRESS),   \
  19.                                                   CAST (Value, UCHAR))
  20. #define WR_N_DELAY(AdAdr,Value)  { IO_OUT (AdAdr,Value);                      \
  21.                                    IO_DELAY (1L); }
  22.  
  23. /*****************************************************************************/
  24. /* Defines to get at Irp.  The IO_STACK_LOCATION is defined with unnamed     */
  25. /* structs.  This requires writing things like                               */
  26. /*   IO_STACK_LOCN->Parameters.DeviceIoControl.IoControlCode                 */
  27. /* or using the #defines below                                               */
  28. /*****************************************************************************/
  29.  
  30. #define IRS_CODE   Parameters.DeviceIoControl.IoControlCode
  31. #define IRS_OUTLEN Parameters.DeviceIoControl.OutputBufferLength
  32. #define IRS_INLEN  Parameters.DeviceIoControl.InputBufferLength
  33.  
  34.